package com.demo.cpu;

/**
 * @ClassName : com.demo.cpu.Bytes
 * @Description : 类描述
 * Created by cyd on 2021-11-10 16:20:39
 */
public class Bytes {
    public static String substring(String src, int start_idx, int end_idx) {
        byte[] b = src.getBytes();
        StringBuilder tgt = new StringBuilder();
        for (int i = start_idx; i <= end_idx; i++) {
            tgt.append((char) b[i]);
        }
        return tgt.toString();
    }
}
